<template>
  <div class="newadd">
    <!-- 顶部导航 -->
    <van-nav-bar
      title="返回"
      left-text="新增地址"
      left-arrow
      @click-left="$router.go(-1)"
    />
    <!-- 内容 -->
    <div class="info">
      <div class="lable">
        <b>联系人</b>
        <input type="text" v-model="info.user_name" placeholder="姓名" />
      </div>
      <div class="lable">
        <b></b>
        <div class="lable_s">
          <span>男</span>
          <span>女</span>
        </div>
      </div>
      <div class="lable">
        <b>电话</b>
        <input type="text" v-model="info.user_phone" placeholder="手机号码" />
      </div>
      <div class="lable">
        <b>地址</b>
        <input
          type="text"
          v-model="info.user_address"
          placeholder="请选择收货地址"
        />
      </div>
      <div class="lable">
        <b>门牌号</b> <input type="text" placeholder="例：5号楼203室" />
      </div>
      <div class="lable">
        <b>标签</b>
        <div class="lable_s">
          <span>学校</span>
          <span>家</span>
          <span>公司</span>
        </div>
      </div>
      <div class="use" @click="request_address_add(info)">保存并使用</div>
    </div>
  </div>
</template>

<script>
import { mapActions } from "vuex";
export default {
  data() {
    return {
      info: {
        user_address: "",
        user_phone: "",
        user_name: "",
      },
    };
  },
  methods: {
    ...mapActions(["request_address_add"]),
  },
};
</script>

<style lang="scss" scoped>
.info {
  margin: 10px 0;
}
.lable {
  height: 50px;
  display: flex;
  border-bottom: 1px solid #eee;
  line-height: 50px;
  b {
    font-weight: 600;
    width: 80px;
    padding: 0 10px;
    color: #777;
  }
  input {
    flex: 1;
    border: 0;
    outline: none;
    color: rgba(124, 124, 124, 0.737);
    font-size: 14px;
  }
}
.lable_s span {
  border: 1px solid #777;
  padding: 3px 15px;
  margin: 0 8px;
  border-radius: 5px;
  font-size: 14px;
}
.use {
  height: 40px;
  width: 95%;
  text-align: center;
  color: #fff;
  line-height: 40px;
  background-color: #00a6ff;
  margin: 10px;
  border-radius: 5px;
}
</style>